import React from 'react'  
import { Link } from 'react-router-dom'
import useCounterStore from '@/store/counter'
import CountNum from '@/components/countNum'
import bg from '@/pages/login/imgs/20240219-134954.jpg'
import { useState } from 'react'
import { version } from 'antd'

const Home: React.FC = () => {
  const increase = useCounterStore((state) => state.increase)
  const [title] = useState((import.meta as any).env.VITE_APP_TITLE)
  // eslint-disable-next-line no-process-env
  console.log(process.env.NODE_ENV)
  
  return (
    <div>
      <h1 className="blue">Home Page, title:{title},version:{version}</h1>
      <CountNum />
      <button onClick={increase}>加一</button>
      <p><Link to="/about">页面跳转</Link></p>
      <img className="bg-img" src={bg} alt="logo" />
    </div>
  )
}
export default Home
